% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FIPS_FUNCTIONS.R
\name{fipstype}
\alias{fipstype}
\title{FIPS - Identify what type of Census geography each FIPS code seems to be (block, county, etc.)}
\usage{
fipstype(fips)
}
\arguments{
\item{fips}{vector of one or more Census FIPS with or without leading zeroes, as strings or numeric}
}
\value{
vector of types: "block", "blockgroup", "tract", "city", "county", or "state"
}
\description{
FIPS - Identify what type of Census geography each FIPS code seems to be (block, county, etc.)
}
\details{
NOTE: Does NOT check if fips is a real fips. For that, use \code{\link[=fips_valid]{fips_valid()}}

Note a number of length 11 is an ambiguous case this is able to resolve as
either a complete tract fips or a blockgroup fips with a missing leading zero.
}
\examples{
 fips_counties_from_statename("Delaware")
 fipstype(9001)
 fipstype("10001")
 
test_tract_missing0 =   4013116500   # 10 digits tract missing 0
test_tract_good     = "04013116500"  # 11 digits full tract includes leading 0 !!!!!!!!!!
test_bg_missing0    =   40131165002  # 11 digits blockgroup missing leading 0 !!!!!!!!!!
test_bg_good        = "040131165002" # 12 digits full blockgroup

fipstype(test_tract_missing0)
fipstype(test_tract_good)
fipstype(test_bg_missing0)
fipstype(test_bg_good)

fips_valid(test_tract_missing0)
fips_valid(test_bg_missing0)

}
